<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">
<ui:include src="/pages/common/head.xhtml" />
<f:view contentType="text/html">
	<h:body>
		<ui:include src="/pages/common/loading.xhtml" />

		<h:panelGroup id="page" layout="block">
			<h:panelGroup id="content" layout="block">
				<p:dialog id="login" header="Login" visible="true" closable="false" draggable="false" resizable="false" width="270"
					style="position: relative !important;">
					<form action="j_spring_security_check" method="post" autocomplete="off">
						<h:panelGrid columns="2" cellpadding="5" width="80%">
							<p:outputLabel for="j_username" value="Usuário" styleClass="label" />
							<p:inputText id="j_username" style="width: 150px" />
							<p:outputLabel for="j_password" value="Senha" styleClass="label" />
							<p:password id="j_password" style="width:150px" />
						</h:panelGrid>
						<p:spacer />
						<p:spacer />

						<h:panelGrid columns="1" style="text-align:center;" width="100%">
							<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left" onclick="statusDialog.show();">
								<span class="ui-button-icon-left ui-icon ui-c ui-icon-circle-arrow-e" /> <span class="ui-button-text ui-c">Login</span>
							</button>
							<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
							<p:spacer />
							<p:spacer />
							<h:outputText value="#{sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}" styleClass="label" />
							<p:spacer />
							<p:spacer />
							<p:messages id="messages" />
								<h:outputLink value="primeiro.jsf?faces-redirect=true">
								<h:outputText value="Primeiro Acesso" />
							</h:outputLink>

						</h:panelGrid>
					</form>
				</p:dialog>
			</h:panelGroup>
		</h:panelGroup>
	
	
	</h:body>
</f:view>
</html>